/*
 * =====================================================================================
 *
 *       Filename:  write_share_mem.c
 *
 *    Description:  write data in share memere
 *
 *        Version:  1.0
 *        Created:  01/22/15 10:28:23
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  yangkun (yk)
 *          Email:  kun.yang@omnificweb.com
 *        Company:  omnificweb.com
 *
 * =====================================================================================
 */

#include <stdio.h>
#include <string.h>
#include "rw_share_mem.h"
int main()
{
	char *buf="abcdefghijklmnopqrstuvwxyz1234567890";
	if(0 != init_share_mem(20480))
	{
		printf("init share mem error\n");
		return -1;
	}
	if(0 != write_share_mem(buf, strlen(buf)+1))
	{
		printf("write share memory error");
		return -2;

	}
	return 0;

}
